<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.time.php';
$login=new core_security;
if ($login->checklogin()=="OK") {
$date=new core_time;
$date->time="12:00";
$date->date=$_SESSION['date2'];
$datestamp=strtotime($_SESSION['date']);
if ($_POST['action'] == "+1") {
	$datestamp=$datestamp+86400;
	$_SESSION['date']=date('m/d/Y',$datestamp);
	$_SESSION['date2']=date('d:m:Y',$datestamp);
	echo date('m/d/Y',$datestamp);
	
 	}
 	if ($_POST['action'] == "-1") {
	$datestamp=$datestamp-86400;
	$_SESSION['date']=date('m/d/Y',$datestamp);
	$_SESSION['date2']=date('d:m:Y',$datestamp);
	echo date('m/d/Y',$datestamp);
	
 	}
}